<%@page contentType="text/html; charset=utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ include file="/include/head.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>编辑用户</title>
<script type="text/javascript">
$(document).ready(function(){
	initView("${action}", null);
});
</script>
<%--<script type="text/javascript" src="js/label/jquery.js"></script>--%>
<link href="js/label/css/lanrenzhijia.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="js/label/lanrenzhijia.js"></script>
</head>
<body>

	
	<form id="form" enctype="multipart/form-data" onsubmit="return iframeCallback(this,closeCurrent);"  action="ds/editDs.do?funId=${funId}" method="post" >
    	<div class="pageContent"  layoutH="35">
			<div class="tabs">
				<div class="tabsHeader">
					<div class="tabsHeaderContent">
						<ul>
							<li><a><span>导师基础信息</span></a></li>
							<li><a><span>关注领域</span></a></li>
							<li><a><span>个人简介</span></a></li>
						<c:if test="${ACTION=='VIEW'}">
							<li><a href="cyzj/cyzjPager.do?TODO=INC_PAGER&map.dsEmpId=${object.id}" class="j-ajax"><span>主导创业之家</span></a></li>
							<li><a href="cyzj/cyzjPager.do?TODO=INC_PAGER&map.dsEmpIds_L=|${object.id}|" class="j-ajax"><span>入驻库创业之家</span></a></li>
							<li><a href="activity/activityPager.do?TODO=INC_PAGER&map.dsEmpIds_L=|${object.id}|" class="j-ajax"><span>参与活动</span></a></li>
						</c:if>
						</ul>
					</div>
				</div>
				<div class="tabsContent"  layoutH="74">
				
				<div class="pageFormContent">   
				        <fieldset class="2_ fieldset"> 
				            
				            <dl class="nowrap">
					        	<dt>头像<br>(建议160*160)：</dt>
					        	<dd>
									<div class="unit">
										<div class="upload-wrap">
											<div class="thumbnail">
												<img src="${Dict.prefix('UPLOAD')}${object.iconUrl}" data-width="0" data-height="0" width="80">
											</div>
										<c:if test="${ACTION!='VIEW'}">
											<input type="file" name="icon" accept="image/*">
										</c:if>
										</div>
									</div>
								</dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>姓名：</dt>
							    <dd>
							    	<input class="required textInput valid" type="text" alt="" value="${object.empName }" size="30" name="empName"/>
					            	<input type="hidden" name="id" value="${object.id }"/>
					            </dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>性别：</dt>
							    <dd>
							    	<label><input type="radio" name="sex" value="M" ${object.sex=='M'?'checked':''}>男</label>
							    	<label><input type="radio" name="sex" value="F" ${object.sex=='F'?'checked':''}>女</label>
					            </dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>手机（登录帐号）：</dt>
							    <dd><input class="required textInput valid" type="text" alt="" value="${object.mobile }" size="30" name="mobile" ${object.id!=null?"readonly":""}></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>专管员A：</dt>
							    <dd>
							    	<select name="adminUserId"  class="required">
										<option value=""></option>
									<c:forEach items="${Dict.getList('ZdzxEmp')}"  var="item" varStatus="varStatus">
										<option value="${item.KEY}"  ${object.adminUserId==item.KEY?'selected':''}>${item.VALUE}</option>
							    	</c:forEach>
							    	</select>
							    </dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>专管员B：</dt>
							    <dd>
							    	<select name="adminUserId2">
										<option value=""></option>
									<c:forEach items="${Dict.getList('ZdzxEmp')}"  var="item" varStatus="varStatus">
										<option value="${item.KEY}"  ${object.adminUserId2==item.KEY?'selected':''}>${item.VALUE}</option>
							    	</c:forEach>
							    	</select>
							    </dd>
							</dl>
							
				            <dl class="nowrap">
					        	<dt>排序值：</dt>
							    <dd><input class="digits textInput valid" type="text" alt="" value="${object.orderInt }" size="30" name="orderInt" placeholder="请输入排序值"></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>所属单位：</dt>
							    <dd>
							    <input class="required textInput valid" type="text" alt="" value="${object.dwName}" size="30" id="dwName" name="dwName"></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>职务：</dt>
							    <dd><input class="required textInput valid" type="text" alt="" value="${object.zw }" size="30" name="zw"></input></dd>
							</dl>
				            
				            <dl class="nowrap">
					        	<dt>职称：</dt>
							    <dd><input class="textInput valid" type="text" alt="" value="${object.zc }" size="30" name="zc"></input></dd>
							</dl>
							
				            <dl class="nowrap">
					        	<dt>资质荣誉：</dt>
							    <dd><input class="textInput valid" type="text" alt="" value="${object.honor }" size="30" name="honor"></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>专业：</dt>
							    <dd><input class="textInput valid" type="text" alt="" value="${object.major }" size="30" name="major"></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>学历：</dt>
							    <dd><input class="textInput valid" type="text" alt="" value="${object.education }" size="30" name="education"></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>学位：</dt>
							    <dd><input class="textInput valid" type="text" alt="" value="${object.degree}" size="30" name="degree"></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>地址：</dt>
							    <dd><input class="textInput valid" type="text" alt="" value="${object.address }" size="30" name="address"></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>电话：</dt>
							    <dd><input class="textInput valid" type="text" alt="" value="${object.tel }" size="30" name="tel"></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>邮箱：</dt>
							    <dd><input class="textInput valid" type="text" alt="" value="${object.email }" size="30" name="email"></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>QQ：</dt>
							    <dd><input class="textInput valid" type="text" alt="" value="${object.qq }" size="30" name="qq"></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>微信：</dt>
							    <dd><input class="textInput valid" type="text" alt="" value="${object.wx }" size="30" name="wx"></input></dd>
							</dl>
				            <dl class="nowrap">
					        	<dt>备注：</dt>
					        	<dd><textarea name="remark" cols="100" rows="3" maxlength="500">${order.remark}</textarea></dd>
					        </dl>
						</fieldset>
					</div>
				
					<div class="pageFormContent">   
				        <fieldset class="2_ fieldset"> 
				        <!-- 
				            <dl class="nowrap">
					        	<dt>所在行业：</dt>
							    <dd>
								    <div class="plus-tag">
										<input type="hidden" size="30" name="labelIndustry"  id="labelIndustry"/>
										<c:forEach items="${labelIndustryList}" var="main">
											<a value="labelIndustryText" title="${main.label}" href="javascript:void(0);"><span>${main.label}</span><em data-id="${main.id}"></em></a>
										</c:forEach>
									</div><br>
									
								<c:if test="${ACTION!='VIEW'}">
								    <input class="textInput valid" type="text" alt="" size="30" name="labelIndustryText"/>
									<a href="javascript:void(0)" data-id="labelIndustryText" class="plus-tag-add">添加标签</a>

									<div class="default-tag tagbtn">
										<div class="clearfix">
											<c:forEach items="${allLabelMainList}" var="label">
												<a value="labelIndustryText" title="${label.label}" href="javascript:void(0);"><span>${label.label}(${label.totalCnt})</span><em></em></a>
											</c:forEach>
										</div>
									</div>
								</c:if>
								</dd>
							</dl>
				         -->
				            <dl class="nowrap">
					        	<dt>关注领域：</dt>
							    <dd>
								    <div class="plus-tag">
										<input type="hidden" size="30" name="labelFocusOn"  id="labelFocusOn"/>
										<c:forEach items="${labelFocusOnList}" var="main">
											<a value="labelFocusOnText" title="${main.label}" href="javascript:void(0);"><span>${main.label}</span><em data-id="${main.id}"></em></a>
										</c:forEach>
									</div><br>
									
								<c:if test="${ACTION!='VIEW'}">
								    <input class="textInput valid" type="text" alt="" size="30" name="labelFocusOnText"/>
									<a href="javascript:void(0)" data-id="labelFocusOnText" class="plus-tag-add">添加标签</a>


									<div class="default-tag tagbtn">
										<div class="clearfix">
											<c:forEach items="${allLabelFocusOnList}" var="label">
												<a value="labelFocusOnText" title="${label.label}" href="javascript:void(0);"><span>${label.label}(${label.totalCnt})</span><em></em></a>
											</c:forEach>
										</div>
									</div>
								</c:if>
								</dd>
							</dl>
				        
				            <dl class="nowrap">
					        	<dt> 辅导专长：</dt>
							    <dd>
								    <div class="plus-tag">
										<input type="hidden" size="30" name="labelHelpFor"  id="labelHelpFor"/>
										<c:forEach items="${labelHelpForList}" var="main">
											<a value="labelHelpForText" title="${main.label}" href="javascript:void(0);"><span>${main.label}</span><em data-id="${main.id}"></em></a>
										</c:forEach>
									</div><br>
								<c:if test="${ACTION!='VIEW'}">
								    <input class="textInput valid" type="text" alt="" size="30" name="labelHelpForText"/>
									<a href="javascript:void(0)" data-id="labelHelpForText" class="plus-tag-add">添加标签</a>


									<div class="default-tag tagbtn">
										<div class="clearfix">
											<c:forEach items="${allLabelHelpForList}" var="label">
												<a value="labelHelpForText" title="${label.label}" href="javascript:void(0);"><span>${label.label}(${label.totalCnt})</span><em></em></a>
											</c:forEach>
										</div>
									</div>
								</c:if>
								</dd>
							</dl>
						</fieldset>
					</div>
				

				
					<div class="pageFormContent">   
				        <fieldset class="2_ fieldset"> 
				           
				            <dl class="nowrap">
					        	<dt>个人简介：</dt>
					        	<dd><textarea placeholder="请输入导师个人简介，不超过500字"  name="empDesc" cols="120" rows="4" maxlength="500">${object.empDesc}</textarea></dd>
					        </dl>
						</fieldset>
					</div>
					<c:if test="${ACTION=='VIEW'}">
					
					<div>  
					</div>
					
					<div>  
					</div>
					
					<div>  
					</div>
					</c:if>
			</div>
			<div class="tabsFooter">
				<div class="tabsFooterContent"></div>
			</div>
		</div>
	</div>
				
    <div class="formBar">
         <ul>
         		<li>
         			<input type="hidden" id="approveStatus" name="approveStatus" value=""/>
            		<input type="hidden" id="ACTION" name="ACTION" value="${ACTION }"/>
            		<input type="hidden" id="TODO" name="TODO" value="${TODO }"/>
             	
             	<li class="EDIT" style="display:none"><div class="button"><div class="buttonContent"><button type="submit" onclick="initSubmit('UNSUBMIT')">保存</button></div></div></li>
             	<li class="EDIT" style="display:none"><div class="button"><div class="buttonContent"><button type="submit" onclick="initSubmit('SUBMITED')">保存并提交</button></div></div></li>
             	<li class="UPDATE" style="display:none"><div class="button"><div class="buttonContent"><button type="submit" onclick="initSubmit('${object.approveStatus}')">保存</button></div></div></li>
            	<li class="APPROVE" style="display:none">审核意见：<input id="approveDesc" class="textInput valid approveObj" type="text" alt="" size="30" name="approveDesc"></input></li>
            	<li class="APPROVE" style="display:none"><div class="button"><div class="buttonContent"><button type="submit" onclick="initSubmit('APPROVED')">审核通过</button></div></div></li>
             	<li class="APPROVE" style="display:none"><div class="button"><div class="buttonContent"><button type="submit" onclick="initSubmit('REJECTED')">审核驳回</button></div></div></li>
			
             <li> <div class="button"><div class="buttonContent"><button class="close" type="button">取消</button></div></div></li>
         </ul>
    </div>
</form>

</body>
	<script type="text/javascript">
	
	$(document).ready(function(){
		initView("${ACTION}","${TODO}","${readyMsg}");
		
		
		/* 
		setOrg = function (event, ui) { 
	        if (ui != null && ui.item != null) { 
	            $("#orgId",navTab.getCurrentPanel()).val(ui.item.id); 
	        } 
	    };
	    
		$("#orgName",navTab.getCurrentPanel()).autocomplete({
			source: getDsOrg,
			minLength:2,
			select: setOrg
		}); */
		
		
	});
/*	initLabel = function(){
		var labelIndustry = "";
		var labelFocusOn = "";
		var labelHelpFor = "";
		$(".plus-tag a").each(function(){
			var labelType = $(this).attr("value");
			var label = $(this).attr("title");
			if("labelIndustryText"==labelType){
				labelIndustry = labelIndustry + "," + label;
			}else if("labelFocusOnText"==labelType){
				labelFocusOn = labelFocusOn+ "," + label;
			}else if("labelHelpForText"==labelType){
				labelHelpFor = labelHelpFor+ "," + label;
			}
		})
		$('#labelIndustry',navTab.getCurrentPanel()).val(labelIndustry);
		$('#labelFocusOn',navTab.getCurrentPanel()).val(labelFocusOn);
		$('#labelHelpFor',navTab.getCurrentPanel()).val(labelHelpFor);
	};*/

	initSubmit = function(approveStatus){
		$('#approveStatus',navTab.getCurrentPanel()).val(approveStatus);
//		initLabel();
		if(approveStatus=='UNSUBMIT'){
			$('#TODO',navTab.getCurrentPanel()).val("EDIT");
		}else if(approveStatus=='SUBMITED'){
			$('#TODO',navTab.getCurrentPanel()).val("SUBMIT");
		}else if(approveStatus=='APPROVED'){
			$('#TODO',navTab.getCurrentPanel()).val("APPROVE");
			<c:if test="${TODO=='APPROE'}">
			return isConfirm('是否确认审核通过？');
			</c:if>
		}else if(approveStatus=='REJECTED'){
			$('#TODO',navTab.getCurrentPanel()).val("APPROVE");
			<c:if test="${TODO=='APPROE'}">
			return isConfirm('是否确认审核驳回？');
			</c:if>
		}
		
	}

</script>
</html>
